<template>
  <div class="n-1-enterpriseDetails-content" >
      
      <!-- 企业详细信息 -->
       <div class="top-navigation-bar">
          <div
           class="navigation-item-box" 
           v-for="(item,index) in topNavigationBar" :key="index" 
           :class="currentSelectData.title == item.title?'select-item-box':''"
           @click="selectChange(item)"
          >
              <span class="navigation-icon" :class="'iconfont '+item.icon"></span>
              <span class="navigation-title">{{ item.title }}</span>
          </div>
       </div>
       <div class="navigation-content-box">
        <div v-if="currentSelectData.title == '企业信息'" class="enterprise-information-box" >
            <div class="enterprise-info-left">
                <div
                class="info-left-item" v-for="(item,index) in enterpriseInfoLeftList" :key="index" 
                :class="currentEnterInfoData.title == item.title?'select-enterInfoItem-box':''"
                @click="selectEnterpriseInfoLeftClick(item)"
                >
                    <span class="info-left-icon" :class="'iconfont '+item.icon" ></span>
                    <span class="info-left-text" >{{ item.title }}</span>
                </div>
            </div>
            <div class="enterprise-info-right"  >
                <div v-if="currentEnterInfoData.title == '基础信息'">
                    <div class="table-box-v">
                        <table border bordercolor="#d9d9d9" style="width: 100%;">
                            <tr>
                                <td class="title-left-v">企业名称</td>
                                <td>{{ currentEnterpriseFrom.fqymc?currentEnterpriseFrom.fqymc:'无' }}</td>
                                <td class="title-left-v">统一社会信用代码</td>
                                <td>{{ currentEnterpriseFrom.ftyshxydm?currentEnterpriseFrom.ftyshxydm:'无' }}</td>
                            </tr>
                            <tr>
                                <td class="title-left-v">注册号</td>
                                <td>{{ currentEnterpriseFrom.fzch?currentEnterpriseFrom.fzch:'无' }}</td>
                                <td class="title-left-v">法定代表人</td>
                                <td>{{ currentEnterpriseFrom.fqyfddbrfzr?currentEnterpriseFrom.fqyfddbrfzr:'无' }}</td>
                            </tr>
                            <tr>
                                <td class="title-left-v">企业性质</td>
                                <td>{{ currentEnterpriseFrom.fqyxz?currentEnterpriseFrom.fqyxz:'无' }}</td>
                                <td class="title-left-v">成立日期</td>
                                <td>{{ currentEnterpriseFrom.fclrq?currentEnterpriseFrom.fclrq:'无' }}</td>
                            </tr>
                            <tr>
                                <td class="title-left-v">联系人</td>
                                <td>{{ currentEnterpriseFrom.fqylxr?currentEnterpriseFrom.fqylxr:'无' }}</td>
                                <td class="title-left-v">联系电话</td>
                                <td>{{ currentEnterpriseFrom.fqylxrdh?currentEnterpriseFrom.fqylxrdh:'无' }}</td>
                            </tr>
                            <tr>
                                <td class="title-left-v">登记机关</td>
                                <td>{{ currentEnterpriseFrom.fdjjg?currentEnterpriseFrom.fdjjg:'无' }}</td>
                                <td class="title-left-v">登记状态</td>
                                <td>{{ currentEnterpriseFrom.fdjzt?currentEnterpriseFrom.fdjzt:'无' }}</td>
                            </tr>
                            <tr>
                                <td class="title-left-v">住所</td>
                                <td colspan="3">{{ currentEnterpriseFrom.fqyzszcdz?currentEnterpriseFrom.fqyzszcdz:'无' }}</td>
                            </tr>
                            <tr>
                                <td class="title-left-v">经营范围(营业执照)</td>
                                <td colspan="3">{{ currentEnterpriseFrom.fxkfw?currentEnterpriseFrom.fxkfw:'无' }}</td>
                            </tr>
                            <tr>
                                <td class="title-left-v">注册资本</td>
                                <td>{{ currentEnterpriseFrom.fzczb?currentEnterpriseFrom.fzczb:'无' }}</td>
                                <td class="title-left-v">职工人数</td>
                                <td>{{ currentEnterpriseFrom.fzgrs?currentEnterpriseFrom.fzgrs:'无' }}</td>
                            </tr>
                            
                        </table>
                        
                    </div>
                </div>
                <div v-if="currentEnterInfoData.title == '证件信息'">
                    <commpVxeTable
                        :key="refreshTable"
                        ref="headmanVxeTable"
                        :config="{
                            api:assessCheckApi.xzxkqyqueryQyzj,
                            rowId: 'id',
                            height:windowInnerHeight - 220,
                            autoHidden:true,
                            paramet:{
                                fqyid:currentEnterpriseFrom.id,
                                tyshxydm:currentEnterpriseFrom.ftyshxydm
                            }
                        }" 
                        :columns="documentColumnsVxe" 
                        :formItem="documentFormItem"
                        :adaptiveHeight="true"
                        tablePadding="0"
                        :conditionBtnRow="true"
                        :isCanWrap="true"
                    >
                        <template v-slot:sfyx_name="{row}" >
                            <span v-if="row.sfyx == 1" style="color:#91cc75">有效</span>
                            <span v-else style="color: #ee6666;">无效</span>
                        </template>
                        <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                            <a-form layout="inline" class="search-form" >
                                <a-form-item v-if="row.zjmc == '药品生产许可证'">
                                    <a-button class="blue-btn" type="primary" @click="detailsClick(row)" >详情</a-button>
                                </a-form-item>
                            </a-form> 
                        </template>
                    </commpVxeTable>
                    <enterDetails ref="enterDetailsRef" />
                </div>
                <div v-if="currentEnterInfoData.title == '企业产值'">
                    <commpVxeEditTable
                        :key="refreshTable"
                        ref="commpVxeEditTableRef5"
                        :config="{
                            api:assessCheckApi.spcyQyInfogetCzPage,
                            rowId: 'id',
                            height:windowInnerHeight - 363,
                            isAddColumn:true,
                            paramet:{
                                fqyid:currentEnterpriseFrom.id,
                                tyshxydm:currentEnterpriseFrom.ftyshxydm
                            }
                        }" 
                        :columns="outputValueVxe" 
                        :formItem="outputValueFormItem"
                        tablePadding="0"
                        :conditionBtnRow="true"
                        :isCanWrap="true"
                    >
                        <!-- <template v-slot:externalOperations="{data}" v-if="!isDisabled">
                            <vxe-form-item>
                                <template>
                                    <a-button class="blue-btn" type="primary" @click="addClick(5)">新增</a-button>
                                </template>
                            </vxe-form-item>
                        </template> -->
                        <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                        <!-- || !row.id || (row.id && row.id.indexOf('row_') !== -1) -->
                        <a-form layout="inline" class="search-form" v-if="$refs.commpVxeEditTableRef5.$refs.xGrid.isActiveByRow(row)">
                            <a-form-item>
                                <a-button class="blue-btn" :loading="saveEditLoading" type="primary" @click="saveEditTableClick({...row,fnf:moment(row.fnf).format('YYYY')},5,'commpVxeEditTableRef5')" >保存</a-button>
                            </a-form-item>
                            <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                                <a-button @click="$refs.commpVxeEditTableRef5.removeRowEvent(row)" >移除</a-button>
                            </a-form-item>
                            <a-form-item v-else>
                                <a-button @click="$refs.commpVxeEditTableRef5.cancelRowEvent(row)" >取消</a-button>
                            </a-form-item>
                        </a-form>
                            <a-form layout="inline" class="search-form" v-else>
                                <a-form-item v-if="!isDisabled">
                                <!-- @click="editClick(row,5)" -->
                                    <a-button class="blue-btn" type="primary" @click="$refs.commpVxeEditTableRef5.insertEvent(row)" >编辑</a-button>
                                </a-form-item>
                                <a-form-item v-else>
                                    <a-button class="blue-btn" type="primary" @click="editClick(row,5,'查看')" >查看</a-button>
                                </a-form-item>
                                <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                                <a-button @click="$refs.commpVxeEditTableRef5.removeRowEvent(row)" >移除</a-button>
                            </a-form-item>
                                <a-form-item v-if="!isDisabled && !(!row.id || (row.id && row.id.indexOf('row_') !== -1))" >
                                    <a-button class="red-btn" type="primary" @click="deleteClick(row,5)" >删除</a-button>
                                </a-form-item>
                            </a-form> 
                        </template>
                    </commpVxeEditTable>
                    <addEdit5 ref="addEditRef5" @addItem="addItem" @editItem="editItem"/>
                </div>
                <div v-if="currentEnterInfoData.title == '研发投入'">
                    <commpVxeEditTable
                        :key="refreshTable"
                        ref="commpVxeEditTableRef6"
                        :config="{
                            api:assessCheckApi.spcyQyInfogetYftrPage,
                            rowId: 'id',
                            isAddColumn:true,
                            height:windowInnerHeight - 363,
                            paramet:{
                                fqyid:currentEnterpriseFrom.id,
                                tyshxydm:currentEnterpriseFrom.ftyshxydm
                            }
                        }" 
                        :columns="RDInvestmentColumnsVxe" 
                        :formItem="outputValueFormItem"
                        tablePadding="0"
                        :conditionBtnRow="true"
                        :isCanWrap="true"
                    >
                        <!-- <template v-slot:externalOperations="{data}" v-if="!isDisabled">
                            <vxe-form-item>
                                <template>
                                    <a-button class="blue-btn" type="primary" @click="addClick(6)">新增</a-button>
                                </template>
                            </vxe-form-item>
                        </template> -->
                        <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                            <a-form layout="inline" class="search-form" v-if="$refs.commpVxeEditTableRef6.$refs.xGrid.isActiveByRow(row)">
                                <a-form-item>
                                    <a-button class="blue-btn" :loading="saveEditLoading" type="primary" @click="saveEditTableClick({...row,fnf:moment(row.fnf).format('YYYY')},6,'commpVxeEditTableRef6')" >保存</a-button>
                                </a-form-item>
                                <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                                    <a-button @click="$refs.commpVxeEditTableRef6.removeRowEvent(row)" >移除</a-button>
                                </a-form-item>
                                <a-form-item v-else>
                                    <a-button @click="$refs.commpVxeEditTableRef6.cancelRowEvent(row)" >取消</a-button>
                                </a-form-item>
                            </a-form>
                            <a-form layout="inline" class="search-form" v-else>
                                <a-form-item v-if="!isDisabled">
                                    <!-- @click="editClick(row,5)" -->
                                    <a-button class="blue-btn" type="primary" @click="$refs.commpVxeEditTableRef6.insertEvent(row)" >编辑</a-button>
                                </a-form-item>
                                <a-form-item v-else>
                                    <a-button class="blue-btn" type="primary" @click="editClick(row,6,'查看')" >查看</a-button>
                                </a-form-item>
                                <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                                    <a-button @click="$refs.commpVxeEditTableRef6.removeRowEvent(row)" >移除</a-button>
                                </a-form-item>
                                <a-form-item v-if="!isDisabled && !(!row.id || (row.id && row.id.indexOf('row_') !== -1))" >
                                    <a-button class="red-btn" type="primary" @click="deleteClick(row,6)" >删除</a-button>
                                </a-form-item>
                            </a-form> 
                        </template>
                    </commpVxeEditTable>
                    <addEdit6 ref="addEditRef6" @addItem="addItem" @editItem="editItem"/>
                </div>
                <div v-if="currentEnterInfoData.title == '人员信息'">
                    <div class="personnel-class-top-v">
                        <div class="personnel-class-title">
                            <span class="vertical-line"></span>
                            <span class="title" >企业关键人员</span>
                        </div>
                        <div v-if="KeyPersonnelShow" @click="KeyPersonnelShow = !KeyPersonnelShow" class="hide-display-box">隐藏列表<a-icon type="up" style="padding-top: 1px;padding-left: 3px;"/></div>
                        <div v-if="!KeyPersonnelShow" @click="KeyPersonnelShow = !KeyPersonnelShow" class="hide-display-box">显示列表<a-icon type="down" style="padding-top: 1px;padding-left: 3px;"/></div>
                    </div>
                    <div v-if="KeyPersonnelShow">
                        <commpVxeTable
                            :key="KeyPersonnelreshTable"
                            ref="headmanVxeTable"
                            :config="{
                                api:assessCheckApi.xzxkqyqueryQyRyxx,
                                rowId: 'id',
                                height:windowInnerHeight - 220,
                                autoHidden:true,
                                paramet:{
                                    fqyid:currentEnterpriseFrom.id,
                                    tyshxydm:currentEnterpriseFrom.ftyshxydm
                                }
                            }" 
                            :columns="personnelInfoColumnsVxe" 
                            :formItem="[]"
                            :adaptiveHeight="true"
                            tablePadding="0"
                            :conditionBtnRow="true"
                            :isCanWrap="true"
                        > 
                            <template v-slot:externalOperations="{data}" v-if="!isDisabled">
                                <vxe-form-item>
                                    <template>
                                        <a-button class="blue-btn" type="primary" @click="personnelExportClick('关键人员')">导出</a-button>
                                    </template>
                                </vxe-form-item>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                <a-form layout="inline" class="search-form" >
                                    <a-form-item v-if="row.zjmc == '药品生产许可证'">
                                        <a-button class="blue-btn" type="primary" @click="detailsClick(row)" >详情</a-button>
                                    </a-form-item>
                                </a-form> 
                            </template>
                        </commpVxeTable>
                    </div>
                    <div class="personnel-class-top-v" style="margin-top: 10px;" >
                        <div class="personnel-class-title">
                            <span class="vertical-line"></span>
                            <span class="title" >企业其他人员</span>
                        </div>
                        <div v-if="othersPersonnelShow" @click="othersPersonnelShow = !othersPersonnelShow" class="hide-display-box">隐藏列表<a-icon type="up" style="padding-top: 1px;padding-left: 3px;"/></div>
                        <div v-if="!othersPersonnelShow" @click="othersPersonnelShow = !othersPersonnelShow" class="hide-display-box">显示列表<a-icon type="down" style="padding-top: 1px;padding-left: 3px;"/></div>
                    </div>
                    <div v-if="othersPersonnelShow">
                        <commpVxeEditTable
                            :key="refreshTable"
                            ref="commpVxeEditTableRef7"
                            :config="{
                                api:assessCheckApi.xzxkqyqueryQyQtRy,
                                rowId: 'id',
                                autoHidden:true,
                                isAddColumn:true,
                                addDefaultrow:{frylx:'其他人员'},
                                paramet:{
                                    fqyid:currentEnterpriseFrom.id,
                                    tyshxydm:currentEnterpriseFrom.ftyshxydm
                                }
                            }" 
                            :columns="othersPersonnelColumnsVxe" 
                            :formItem="othersPersonnelFormItem"
                            tablePadding="0"
                            :conditionBtnRow="true"
                            :adaptiveHeight="true"
                            :isCanWrap="true"
                        >
                            <template v-slot:externalOperations="{data}" v-if="!isDisabled">
                                <vxe-form-item>
                                    <!-- <template>
                                        <a-button class="blue-btn" type="primary" @click="addClick(7)">新增</a-button>
                                    </template> -->
                                </vxe-form-item>
                                <vxe-form-item>
                                    <template>
                                        <a-button class="blue-btn" type="primary" @click="personnelExportClick('其他人员')">导出</a-button>
                                    </template>
                                </vxe-form-item>
                                <vxe-form-item>
                                    <template>
                                        <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" action="" @change="leadingInClick">
                                            <a-button class="blue-btn" type="default"  icon="import">导入</a-button>
                                        </a-upload>
                                    </template>
                                </vxe-form-item>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                            <a-form layout="inline" class="search-form" v-if="$refs.commpVxeEditTableRef7.$refs.xGrid.isActiveByRow(row)">
                                <a-form-item>
                                    <a-button class="blue-btn" :loading="saveEditLoading" type="primary" @click="saveEditTableClick({...row,},7,'commpVxeEditTableRef7')" >保存</a-button>
                                </a-form-item>
                                <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                                    <a-button @click="$refs.commpVxeEditTableRef7.removeRowEvent(row)" >移除</a-button>
                                </a-form-item>
                                <a-form-item v-else>
                                    <a-button @click="$refs.commpVxeEditTableRef7.cancelRowEvent(row)" >取消</a-button>
                                </a-form-item>
                            </a-form>
                            <a-form layout="inline" class="search-form" v-else>
                                <a-form-item v-if="!isDisabled">
                                    <!-- @click="editClick(row,5)" -->
                                    <a-button class="blue-btn" type="primary" @click="$refs.commpVxeEditTableRef7.insertEvent(row)" >编辑</a-button>
                                </a-form-item>
                                <a-form-item v-else>
                                    <a-button class="blue-btn" type="primary" @click="editClick(row,7,'查看')" >查看</a-button>
                                </a-form-item>
                                <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                                    <a-button @click="$refs.commpVxeEditTableRef7.removeRowEvent(row)" >移除</a-button>
                                </a-form-item>
                                <a-form-item v-if="!isDisabled && !(!row.id || (row.id && row.id.indexOf('row_') !== -1))" >
                                    <a-button class="red-btn" type="primary" @click="deleteClick(row,7)" >删除</a-button>
                                </a-form-item>
                            </a-form> 
                                <!-- <a-form layout="inline" class="search-form" >
                                    <a-form-item v-if="!isDisabled">
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,7)" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item v-else>
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,7,'查看')" >查看</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="!isDisabled">
                                        <a-button class="red-btn" type="primary" @click="deleteClick(row,7)" >删除</a-button>
                                    </a-form-item>
                                </a-form>  -->
                            </template>
                        </commpVxeEditTable>
                        <addEdit7 ref="addEditRef7" @addItem="addItem" @editItem="editItem"/>
                    </div>
                </div>
                <div v-if="currentEnterInfoData.title == '生产设备'">
                
                    <commpVxeEditTable
                        :key="refreshTable"
                        ref="commpVxeEditTableRef11"
                        :config="{
                            api:assessCheckApi.spcyQyInfoqueryQySbxxPageList,
                            rowId: 'id',
                            isAddColumn:true,
                            height:windowInnerHeight - 373,
                            paramet:{
                                fqyid:currentEnterpriseFrom.id,
                                fsblx:'生产设备'
                            }
                        }" 
                        :columns="deviceInfoColumnsVxe" 
                        :formItem="deviceInfoFormItem"
                        :isCanWrap="true"
                        :conditionBtnRow="true"
                    > 
                        <!-- <template v-slot:externalOperations="{data}" v-if="!isDisabled">
                            <vxe-form-item>
                                <template>
                                    <a-button class="blue-btn" type="primary" @click="addClick(11,{fsblx:'生产设备'})">新增</a-button>
                                </template>
                            </vxe-form-item>
                        </template> -->
                    <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                        <a-form layout="inline" class="search-form" v-if="$refs.commpVxeEditTableRef11.$refs.xGrid.isActiveByRow(row)">
                            <a-form-item>
                                <a-button class="blue-btn" :loading="saveEditLoading" type="primary" @click="saveEditTableClick({...row,fsblx:'生产设备'},11,'commpVxeEditTableRef11')" >保存</a-button>
                            </a-form-item>
                            <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                                <a-button @click="$refs.commpVxeEditTableRef11.removeRowEvent(row)" >移除</a-button>
                            </a-form-item>
                            <a-form-item v-else>
                                <a-button @click="$refs.commpVxeEditTableRef11.cancelRowEvent(row)" >取消</a-button>
                            </a-form-item>
                        </a-form>
                        <a-form layout="inline" class="search-form" v-else>
                            <a-form-item v-if="!isDisabled">
                                <!-- @click="editClick(row,5)" -->
                                <a-button class="blue-btn" type="primary" @click="$refs.commpVxeEditTableRef11.insertEvent(row)" >编辑</a-button>
                            </a-form-item>
                            <a-form-item v-else>
                                <a-button class="blue-btn" type="primary" @click="editClick({...row,fsblx:'生产设备'},11,'查看')" >查看</a-button>
                            </a-form-item>
                            <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                                <a-button @click="$refs.commpVxeEditTableRef11.removeRowEvent(row)" >移除</a-button>
                            </a-form-item>
                            <a-form-item v-if="!isDisabled && !(!row.id || (row.id && row.id.indexOf('row_') !== -1))" >
                                <a-button class="red-btn" type="primary" @click="deleteClick({...row,fsblx:'生产设备'},11)" >删除</a-button>
                            </a-form-item>
                        </a-form> 
                    </template>
                    </commpVxeEditTable>
                    <!-- 设备新增编辑 -->
                    <addEdit11 ref="addEditRef11" @addItem="addItem" @editItem="editItem"/>
                </div>
                <div v-if="currentEnterInfoData.title == '检验设备'" >
                    <commpVxeEditTable
                        :key="refreshTable"
                        ref="commpVxeEditTableRef11_2"
                        :config="{
                            api:assessCheckApi.spcyQyInfoqueryQySbxxPageList,
                            rowId: 'id',
                            isAddColumn:true,
                            height:windowInnerHeight - 373,
                            paramet:{
                                fqyid:currentEnterpriseFrom.id,
                                fsblx:'检验设备'
                            }
                        }" 
                        :columns="deviceInfoColumnsVxe2" 
                        :formItem="deviceInfoFormItem"
                        :isCanWrap="true"
                        :conditionBtnRow="true"
                    > 
                        <!-- <template v-slot:externalOperations="{data}" v-if="!isDisabled">
                            <vxe-form-item>
                                <template>
                                    <a-button class="blue-btn" type="primary" @click="addClick(11,{fsblx:'检验设备'})">新增</a-button>
                                </template>
                            </vxe-form-item>
                        </template> -->
                        <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                        <a-form layout="inline" class="search-form" v-if="$refs.commpVxeEditTableRef11_2.$refs.xGrid.isActiveByRow(row)">
                                <a-form-item>
                                    <a-button class="blue-btn" :loading="saveEditLoading" type="primary" @click="saveEditTableClick({...row,fsblx:'检验设备'},11,'commpVxeEditTableRef11_2')" >保存</a-button>
                                </a-form-item>
                                <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                                    <a-button @click="$refs.commpVxeEditTableRef11_2.removeRowEvent(row)" >移除</a-button>
                                </a-form-item>
                                <a-form-item v-else>
                                    <a-button @click="$refs.commpVxeEditTableRef11_2.cancelRowEvent(row)" >取消</a-button>
                                </a-form-item>
                            </a-form>
                            <a-form layout="inline" class="search-form" v-else>
                                <a-form-item v-if="!isDisabled">
                                    <!-- @click="editClick(row,5)" -->
                                    <a-button class="blue-btn" type="primary" @click="$refs.commpVxeEditTableRef11_2.insertEvent(row)" >编辑</a-button>
                                </a-form-item>
                                <a-form-item v-else>
                                    <a-button class="blue-btn" type="primary" @click="editClick({...row,fsblx:'检验设备'},11,'查看')" >查看</a-button>
                                </a-form-item>
                                <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                                    <a-button @click="$refs.commpVxeEditTableRef11_2.removeRowEvent(row)" >移除</a-button>
                                </a-form-item>
                                <a-form-item v-if="!isDisabled && !(!row.id || (row.id && row.id.indexOf('row_') !== -1))" >
                                    <a-button class="red-btn" type="primary" @click="deleteClick({...row,fsblx:'检验设备'},11)" >删除</a-button>
                                </a-form-item>
                            </a-form> 
                        </template>
                    </commpVxeEditTable>
                    <addEdit11 ref="addEditRef11" @addItem="addItem" @editItem="editItem"/>
                </div>
                <div v-if="currentEnterInfoData.title == '供应商'">
                    <commpVxeEditTable
                        :key="refreshTable"
                        ref="commpVxeEditTableRef4"
                        :config="{
                            api:assessCheckApi.spcyQyInfoQueryYlgyssjPageList,
                            rowId: 'id',
                            height:windowInnerHeight - 220,
                            autoHidden:true,
                            isAddColumn:true,
                            paramet:{
                                fqyid:currentEnterpriseFrom.id
                            }
                        }" 
                        :columns="rawMaterialColumnsVxe" 
                        :formItem="[{
                            label: '供应商名称',
                            model: 'fscsmc',
                        }]"
                        :adaptiveHeight="true"
                        tablePadding="0"
                        :conditionBtnRow="true"
                        @resettingFromChange="resettingFromChange"
                    > 
                        <!-- <template v-slot:externalOperations="{data}" v-if="!isDisabled">
                            <vxe-form-item>
                                <template>
                                    <a-button class="blue-btn" type="primary" @click="addClick(4)">新增</a-button>
                                </template>
                            </vxe-form-item>
                        </template> -->
                        <template v-slot:sfgq_name="{row}">
                            <span v-if="row.sfgq == '长期有效'" style="color: #91cc75;">长期有效</span>
                            <span v-if="row.sfgq == '未过期'" style="color: #5470c6;">未过期</span>
                            <span v-if="row.sfgq == '即将过期'" style="color: #fac858;">即将过期</span>
                            <span v-if="row.sfgq == '已过期'" style="color: #ee6666;">已过期</span>
                        </template>
                        <template v-slot:fsjkssj_fsjjssj="{row}">
                        {{ row.fsjkssj }}至{{ row.fsjjssj }}
                        </template>
                        <template v-slot:fsjkssj_edit="{row}">
                        <a-range-picker v-model="formEditState.AuditCycleArr" :allowClear="false" />
                        </template>
                        <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                            <a-form layout="inline" class="search-form" v-if="$refs.commpVxeEditTableRef4.$refs.xGrid.isActiveByRow(row)">
                                <a-form-item>
                                    <a-button class="blue-btn" :loading="saveEditLoading" type="primary" @click="saveEditTableClick(
                                        {...row,fsjkssj:formEditState.AuditCycleArr && formEditState.AuditCycleArr.length?moment(formEditState.AuditCycleArr[0]).format('YYYY-MM-DD'):'',
                                        fsjjssj:formEditState.AuditCycleArr && formEditState.AuditCycleArr.length?moment(formEditState.AuditCycleArr[1]).format('YYYY-MM-DD'):''},
                                        4,
                                        'commpVxeEditTableRef4')" 
                                    >保存</a-button>
                                </a-form-item>
                                <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                                    <a-button @click="$refs.commpVxeEditTableRef4.removeRowEvent(row)" >移除</a-button>
                                </a-form-item>
                                <a-form-item v-else>
                                    <a-button @click="$refs.commpVxeEditTableRef4.cancelRowEvent(row)" >取消</a-button>
                                </a-form-item>
                            </a-form>
                            <a-form layout="inline" class="search-form" v-else>
                                <a-form-item v-if="!isDisabled">
                                    <!-- @click="editClick(row,5)" -->
                                    <a-button class="blue-btn" type="primary" @click="$refs.commpVxeEditTableRef4.insertEvent(row);formEditState.AuditCycleArr = row.fsjkssj && row.fsjjssj?[row.fsjkssj,row.fsjjssj]:[]" >编辑</a-button>
                                </a-form-item>
                                <a-form-item v-else>
                                    <a-button class="blue-btn" type="primary" @click="editClick({...row},4,'查看')" >查看</a-button>
                                </a-form-item>
                                <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                                    <a-button @click="$refs.commpVxeEditTableRef4.removeRowEvent(row)" >移除</a-button>
                                </a-form-item>
                                <a-form-item v-if="!isDisabled && !(!row.id || (row.id && row.id.indexOf('row_') !== -1))" >
                                    <a-button class="red-btn" type="primary" @click="deleteClick({...row},4)" >删除</a-button>
                                </a-form-item>
                            </a-form>
                        </template>
                    </commpVxeEditTable>
                    <!-- 供应商新增编辑 -->
                    <addEdit4 ref="addEditRef4" @addItem="addItem" @editItem="editItem"/>
                </div>
                <!-- xzxkqyqueryQyRyxx -->
                <div v-if="currentEnterInfoData.title == '物料管理'">
                    <materialManage ref="materialManageRef" />
                </div>
            </div>
        </div>
        <div v-if="currentSelectData.title == '品种信息'" class="enterprise-information-box">
              <commpVxeEditTable
                  :key="refreshTable"
                  ref="commpVxeEditTableRef2"
                  :config="{
                      api:assessCheckApi.spcyQyInfoQueryPzjbxxPageList,
                      rowId: 'id',
                      height:windowInnerHeight - 220,
                      autoHidden:true,
                      isAddColumn:true,
                      paramet:{
                          fqyid:currentEnterpriseFrom.id
                      }
                  }" 
                  :columns="breedColumnsVxe" 
                  :formItem="[]"
                  :isCanWrap="true"
                  :adaptiveHeight="true"
              > 
                  <!-- <template v-slot:externalOperations="{data}" v-if="!isDisabled">
                      <vxe-form-item>
                          <template>
                              <a-button class="blue-btn" type="primary" @click="addClick(2)">新增</a-button>
                          </template>
                      </vxe-form-item>
                  </template> -->
                  <template v-slot:fcplb_name="{row}"> 
                    <a-select v-model:value="row.fcplb" style="width: 100%" placeholder="请选择产品类别">
                        <a-select-option v-for="(item,index) in productCategoryList" :key="index" :value="item.value">{{ item.label }}</a-select-option>
                    </a-select>
                  </template>
                  <template v-slot:fypscfs_name="{row}"> 
                    <a-select v-model:value="row.fypscfs" style="width: 100%" placeholder="请选择生产方式">
                        <a-select-option value="自行生产">自行生产</a-select-option>
                        <a-select-option value="委托生产">委托生产</a-select-option>
                    </a-select>
                  </template>
                  <!-- <template v-slot:fstqymc_name="{row}"> 
                    <a-select v-model:value="row.fcplb" style="width: 100%" >

                    </a-select>
                  </template>
                  <template v-slot:fstqydz_name="{row}"> 
                    <a-select v-model:value="row.fcplb" style="width: 100%" >

                    </a-select>
                  </template> -->


                  <template v-slot:operation_btn="{row}" data-desc="自定操作栏" >
                    <a-form layout="inline" class="search-form" v-if="$refs.commpVxeEditTableRef2.$refs.xGrid.isActiveByRow(row)">
                        <a-form-item>
                            <a-button class="blue-btn" :loading="saveEditLoading" type="primary" @click="saveEditTableClick(
                                {...row,fypyxq:row.fypyxq?moment(row.fypyxq).format('YYYY-MM-DD'):'',fpzwhyxq:row.fpzwhyxq?moment(row.fpzwhyxq).format('YYYY-MM-DD'):'',},
                                2,
                                'commpVxeEditTableRef2')" 
                            >保存</a-button>
                        </a-form-item>
                        <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                            <a-button @click="$refs.commpVxeEditTableRef2.removeRowEvent(row)" >移除</a-button>
                        </a-form-item>
                        <a-form-item v-else>
                            <a-button @click="$refs.commpVxeEditTableRef2.cancelRowEvent(row)" >取消</a-button>
                        </a-form-item>
                    </a-form>
                    <a-form layout="inline" class="search-form" v-else>
                        <a-form-item v-if="!isDisabled">
                            <!-- @click="editClick(row,5)" -->
                            <a-button class="blue-btn" type="primary" @click="$refs.commpVxeEditTableRef2.insertEvent(row)" >编辑</a-button>
                        </a-form-item>
                        <a-form-item v-else>
                            <a-button class="blue-btn" type="primary" @click="editClick({...row},2,'查看')" >查看</a-button>
                        </a-form-item>
                        <a-form-item v-if="!row.id || (row.id && row.id.indexOf('row_') !== -1)">
                            <a-button @click="$refs.commpVxeEditTableRef2.removeRowEvent(row)" >移除</a-button>
                        </a-form-item>
                        <a-form-item v-if="!isDisabled && !(!row.id || (row.id && row.id.indexOf('row_') !== -1))" >
                            <a-button class="red-btn" type="primary" @click="deleteClick({...row},2)" >删除</a-button>
                        </a-form-item>
                    </a-form>
                      <!-- <a-form layout="inline" class="search-form">
                          <a-form-item v-if="!isDisabled">
                              <a-button class="blue-btn" type="primary" @click="editClick(row,2)" >编辑</a-button>
                          </a-form-item>
                          <a-form-item v-else>
                              <a-button class="blue-btn" type="primary" @click="editClick(row,2,'查看')" >查看</a-button>
                          </a-form-item>
                          <a-form-item v-if="!isDisabled">
                              <a-button class="red-btn" type="primary" @click="deleteClick(row,2)" >删除</a-button>
                          </a-form-item>
                      </a-form>  -->
                  </template>
              </commpVxeEditTable>
              <!-- 品种信息新增编辑 -->
              <addEdit2 ref="addEditRef2" @addItem="addItem" @editItem="editItem"/>
          </div>
          <div v-if="currentSelectData.title == '审评信息'" class="enterprise-information-box">
              <commpVxeTable
                  :key="refreshTable"
                  ref="headmanVxeTable"
                  :config="{
                      api:assessCheckApi.xzxkqyqueryQyRcjc,
                      rowId: 'id',
                      height:windowInnerHeight - 220,
                      autoHidden:true,
                      paramet:{
                          fqyid:currentEnterpriseFrom.id,
                          tyshxydm:currentEnterpriseFrom.ftyshxydm
                      }
                  }" 
                  :columns="inspectColumnsVxe" 
                  :formItem="[]"
                  :isCanWrap="true"
                  :adaptiveHeight="true"
              > 
                  <template v-slot:operation_btn="{row}" data-desc="自定操作栏" >
                      <a-form layout="inline" class="search-form">
                          <a-form-item v-if="!isDisabled">
                              <a-button class="blue-btn" type="primary" @click="editClick(row,2)" >编辑</a-button>
                          </a-form-item>
                          <a-form-item v-else>
                              <a-button class="blue-btn" type="primary" @click="editClick(row,2,'查看')" >查看</a-button>
                          </a-form-item>
                          <a-form-item v-if="!isDisabled">
                              <a-button class="red-btn" type="primary" @click="deleteClick(row,2)" >删除</a-button>
                          </a-form-item>
                      </a-form> 
                  </template>
              </commpVxeTable>
          </div>
       </div>
  </div>
</template>
<script>
import { 
  spcyQyInfoqueryQyJbxxById,
  spcyQyInfoDeleteYlgyssj,
  spcyQyInfoUpdateYlgyssj,
  spcyQyInfoAddYlgyssj,
  spcyQyInfodeleteQySbxx,
  spcyQyInfosaveQySbxx,
  spcyQyInfoDeletePzjbxx,
  spcyQyInfoUpdatePzjbxx,
  spcyQyInfoAddPzjbxx,
  spcyQyInfoaddQyCz,
  spcyQyInfoupdateQyCz,
  spcyQyInfodeleteQyCz,
  spcyQyInfoaddQyYftr,
  spcyQyInfoupdateQyYftr,
  spcyQyInfodeleteQyYftr,
  xzxkqyaddQyQtry,
  xzxkqyupdateQyQtry,
  xzxkqydeleteQyQtry,
  xzxkqyexportQyRyxx,
  xzxkqyexportQyQtRy,
  xzxkqyimportQyQtRy,
} from './service/index'
import assessCheckApi from './service/api'
import commpVxeTable from '@/components/commp-vxe-table/commp-vxe-table.vue'
import commpVxeEditTable from '@/components/commp-vxe-table/commp-vxe-edit-table.vue'
import materialManage from './materialManage/materialManage.vue'
import addEdit2 from './addEdit2.vue'
import addEdit4 from './addEdit4.vue'
import addEdit11 from './addEdit11.vue'
import enterDetails from './enterDetails.vue'
import addEdit5 from './addEdit5.vue'
import addEdit6 from './addEdit6.vue'
import addEdit7 from './addEdit7.vue'
import moment from 'moment'
export default {
  components:{
      commpVxeTable,
      commpVxeEditTable,
      materialManage,
      addEdit2,
      addEdit4,
      addEdit11,
      enterDetails,
      addEdit5,
      addEdit6,
      addEdit7,
  },
  props:{

  },
  data(){
      return{
          assessCheckApi,
          moment,
          saveEditLoading:false,
          windowInnerHeight:window.innerHeight,
          topNavigationBar:[{
              title:'企业信息',
              icon:'spcy-icon-qiyexinxi1',
              ycIcon:'',
          },{
              title:'品种信息',
              icon:'spcy-icon-pinzhong',
              ycIcon:'',
          },{
              title:'审评信息',
              icon:'spcy-icon-chayan',
              ycIcon:'',
          },{
              title:'抽检信息',
              icon:'spcy-icon-choujianguanli',
              ycIcon:'',
          }],
          currentSelectData:{
              title:'企业信息',
              icon:'spcy-icon-qiyexinxi1',
              ycIcon:'',
          },
          enterpriseInfoLeftList:[{//企业信息
              title:'基础信息',
              icon:'spcy-icon-jichuxinxi',
          },{
              title:'证件信息',
              icon:'spcy-icon-zhengqimenhu_zhengjianxinxi',
          },{
              title:'企业产值',
              icon:'spcy-icon-zhengqimenhu_zhengjianxinxi',
          },{
              title:'研发投入',
              icon:'spcy-icon-zhengqimenhu_zhengjianxinxi',
          },{
              title:'人员信息',
              icon:'spcy-icon-renyuanxinxi',
          },{
              title:'生产设备',
              icon:'spcy-icon-tubiaozhizuomoban-',
          },{
              title:'检验设备',
              icon:'spcy-icon-jianyanshebei',
          },{
              title:'供应商',
              icon:'spcy-icon-gongyingshang',
          }
          // ,{
          //     title:'物料管理',
          //     icon:'spcy-icon-wuliaoguanli',
          // }
          ],
          
          currentEnterInfoData:{
              title:'基础信息',
              icon:'spcy-icon-jichuxinxi',
          },
          currentEnterpriseFrom:{},
          commentPassData:{},
          deviceInfoFormItem:[{
              label: '关键字查询',
              model: 'gjz',
          }],
          deviceInfoColumnsVxe:[{//生产设备
              title: '设备名称', 
              field: 'fsbmc',
              width:120,
          },{
              title: '设备编号', 
              field: 'fccbh',
              width:140,
          },{
              title: '设备型号', 
              field: 'fsbxh',
              width:140,
          },{
              title: '生产厂家', 
              field: 'fycd',
              width:150,
          },{
              title: '对应品种', 
              field: 'fsbyt',
              inputType:'多行文本',
              width:150,
          },{
              title: '对应车间', 
              field: 'fdycj',
              width:120,
          },{
              title: '生产线', 
              field: 'fscx',
              inputType:'多行文本',
              width:120,
          },{
              title: '关键技术参数', 
              field: 'fsbjd',
              inputType:'多行文本',
              width:160,
          },{
              title: '生产能力或产量范围', 
              field: 'fjcfw',
              inputType:'多行文本',
              width:160,
          },{
              title: '检定或校准情况', 
              field: 'fjdhjzqk',
              width:160,
          },{
                  title: '操作',
                  field: 'id',
                  slots: {
                      // 使用插槽模板渲染
                      default: 'operation_btn',
                  },
                  width:145,
                  fixed:'right'
          }],
          deviceInfoColumnsVxe2:[{ //设备
              type: 'checkbox', 
              width: 60 ,
              fixed: 'left'
          },{
              title: '设备名称', 
              field: 'fsbmc',
              width:120,
          },{
              title: '设备编号', 
              field: 'fccbh',
              width:140,
          },{
              title: '设备型号', 
              field: 'fsbxh',
              width:140,
          },{
              title: '生产厂家', 
              field: 'fycd',
              width:150,
          },{
              title: '对应品种', 
              field: 'fsbyt',
              inputType:'多行文本',
              width:150,
          },{
              title: '对应场所', 
              field: 'fdycj',
              inputType:'多行文本',
              width:150,
          },{
              title: '关键技术参数', 
              field: 'fsbjd',
              inputType:'多行文本',
              width:150,
          },{
              title: '检定或校准情况', 
              field: 'fjdhjzqk',
              inputType:'多行文本',
              width:150,
          },{
                  title: '操作',
                  field: 'id',
                  slots: {
                      // 使用插槽模板渲染
                      default: 'operation_btn',
                  },
                  width:145,
                  fixed:'right'
          }],
          rawMaterialColumnsVxe:[{ //供应商
            title: '物料名称', 
            field: 'fwlmc',
            width:140,
          },{
            title: '物料编号', 
            field: 'fwlbh',
            width:140,
          },{
              title: '规格', 
              field: 'fgg',
              width:140,
          },
        //   {
        //       title: '供应商类别', 
        //       field: 'fgyslb',
        //   },
          {
              title: '供应商名称', 
              field: 'fjxsmc',//暂用生产商名称
              width:140,
          },{
              title: '供应商地址', 
              field: 'fgysdz',
              width:140,
          },{
              title: '生产商名称', 
              field: 'fscsmc',
              width:140,
          },{
              title: '生产商地址', 
              field: 'fscsdz',
              width:140,
          },{
              title: '审计周期', 
              field: 'fsjkssj',
              width:235,
              slots: {
                default: 'fsjkssj_fsjjssj',
                editSlotName:'fsjkssj_edit',
            },
          },{
              title: '质量标准', 
              field: 'fzlbz',
              width:140,
          },{
                  title: '操作',
                  field: 'id',
                  slots: {
                      // 使用插槽模板渲染
                      default: 'operation_btn',
                  },
                  width:145,
                  fixed:'right'
          }],
          breedColumnsVxe:[{ //品种
              type: 'checkbox', 
              width: 60 ,
              fixed: 'left'
          },{
              title: '通用名称', 
              field: 'ftymc',
              width:140,
          },{
              title: '商品名', 
              field: 'fspm',
              width:140,
          },{
              title: '规格', 
              field: 'fgg',
              width:150,
          },{
              title: '产品类别', 
              field: 'fcplb',
              width:150,
              slots:{
                editSlotName:'fcplb_name'
              }
          },{
              title: '剂型', 
              field: 'fjx',
              width:140,
          },{
              title: '药品有效期', 
              field: 'fypyxq',
              inputType:'日期',
              typeParam:'date',
              width:140,
          },{
              title: '批准文号', 
              field: 'fpzwh',
              width:140,
          },{
              title: '批准文号有限期', 
              field: 'fpzwhyxq',
              inputType:'日期',
              typeParam:'date',
              width:140,
          },{
              title: '执行标准', 
              field: 'fzxbz',
              width:140,
          },{
              title: '生产方式', 
              field: 'fypscfs',
              width:140,
              slots:{
                editSlotName:'fypscfs_name'
              },
          },{
              title: '委托企业名称', 
              field: 'fstqymc',
              width:160,
            //   slots:{
            //     editSlotName:'fstqymc_name'
            //   },
              editDisplay:true,//
              displayKey:'fypscfs',
              displayValue:'委托生产',
          },{
              title: '委托企业地址', 
              field: 'fstqydz',
              width:160,
            //   slots:{
            //     editSlotName:'fstqydz_name'
            //   },
              editDisplay:true,//
              displayKey:'fypscfs',
              displayValue:'委托生产',
          },{
                  title: '操作',
                  field: 'id',
                  slots: {
                      // 使用插槽模板渲染
                      default: 'operation_btn',
                  },
                  width:210,
                  fixed:'right'
          }],
          documentFormItem:[{
              label: '证件名称',
              model: 'zjmc',
              // type:'Select',
              // options:[{
              //     label:'有效',
              //     value:'1'
              // },{
              //     label:'无效',
              //     value:'0'
              // }]
          }],
          documentColumnsVxe:[{//证件信息
              title: '证件名称', 
              field: 'zjmc',
          },{
              title: '证件编号', 
              field: 'zjbh',
          },{
              title: '地址', 
              field: 'zs',
          },{
              title: '发证部门', 
              field: 'fzjg',
          },{
              title: '发证日期', 
              field: 'fzrq',
          },{
              title: '证书期限', 
              field: 'yxqx',
          },{
              title: '是否有效', 
              field: 'sfyx',
              slots: {
                  // 使用插槽模板渲染
                  default: 'sfyx_name',
              },
              
          },
          // {
          //     title: '有效期限', 
          //     field: 'yxqx',
          // },
          {
                  title: '操作',
                  field: 'id',
                  slots: {
                      // 使用插槽模板渲染
                      default: 'operation_btn',
                  },
                  width:72,
                  fixed:'right'
          }],
          outputValueFormItem:[{
              label: '年份',
              model: 'fnf',
              interval:true,
              type:'datePicker',
              format:'YYYY',
          }],
          outputValueVxe:[{//企业产值
              title: '年份', 
              field: 'fnf',
              inputType:'日期',
              typeParam:'year',
          },{
              title: '总产值（万元）', 
              field: 'fzcz',
          },{
              title: '营业税金（万元）', 
              field: 'fyysj',
          },{
              title: '年度新增产品产值（万元）', 
              field: 'fndxzcpcz',
          },{
                  title: '操作',
                  field: 'id',
                  slots: {
                      // 使用插槽模板渲染
                      default: 'operation_btn',
                  },
                  width:145,
                  fixed:'right'
          }],
          RDInvestmentColumnsVxe:[{
              title: '年份', 
              field: 'fnf',
              inputType:'日期',
              typeParam:'year',
              placeholder:'请选择年份'
          },{
              title: '在研产品数量', 
              field: 'fzycpsl',
          },{
              title: '研究投入成本（万元）', 
              field: 'fyjtrcb',
          },{
                  title: '操作',
                  field: 'id',
                  slots: {
                      // 使用插槽模板渲染
                      default: 'operation_btn',
                  },
                  width:145,
                  fixed:'right'
          }],
          personnelInfoColumnsVxe:[{
              title: '人员类型', 
              field: 'ryfl',
          },{
              title: '姓名', 
              field: 'xm',
          },{
              title: '职务', 
              field: 'zw',
          },{
              title: '学历', 
              field: 'xl',
          },{
              title: '专业', 
              field: 'zy',
          },{
              title: '职称', 
              field: 'jszz',
          },{
              title: '身份证件类型', 
              field: 'zjlx',
          },{
              title: '证件号码', 
              field: 'zjhm',
          },{
              title: '部门', 
              field: 'bm',
          },{
              title: '从事年限', 
              field: 'csnx',
          },{
              title: '联系手机', 
              field: 'sj',
          }],
          othersPersonnelFormItem:[{
              label: '姓名',
              model: 'zjmc',
          }],
          othersPersonnelColumnsVxe:[{
              title: '人员类型', 
              field: 'frylx',
              editRender:true,
              width:105,
              fixed:'left'
          },{
              title: '姓名', 
              field: 'fgjry',
              width:100,
          },{
              title: '职务', 
              field: 'fzw',
              width:100,
          },{
              title: '学历', 
              field: 'fxl',
              width:100,
          },{
              title: '专业', 
              field: 'fzy',
              width:100,
          },{
              title: '职称', 
              field: 'fzc',
              width:100,
          },{
              title: '身份证件类型', 
              field: 'fzjlx',
              width:162,
          },{
              title: '证件号码', 
              field: 'fsfzh',
              width:182,
          },{
              title: '部门', 
              field: 'fbm',
              width:105,
          },{
              title: '从事年限', 
              field: 'fcsnx',
              width:126,
          },{
              title: '联系手机', 
              field: 'flxdh',
              width:162,
          },{
            title: '操作',
            field: 'id',
            slots: {
                // 使用插槽模板渲染
                default: 'operation_btn',
            },
            width:145,
            fixed:'right'
          }],
          productCategoryList:[{
            value:'此项不涉及',label:'此项不涉及',
          },{
            value:'化学药品制剂',label:'化学药品制剂',
          },{
            value:'中成药',label:'中成药',
          },{
            value:'中药饮片',label:'中药饮片',
          },{
            value:'疫苗',label:'疫苗',
          },{
            value:'血液制品',label:'血液制品',
          },{
            value:'生物制品(疫苗、血液制品除外)',label:'生物制品(疫苗、血液制品除外)',
          },{
            value:'原料药',label:'原料药',
          },{
            value:'医用氧',label:'医用氧',
          },{
            value:'麻醉药品',label:'麻醉药品',
          },{
            value:'第一类精神药品',label:'第一类精神药品',
          },{
            value:'第二类精神药品',label:'第二类精神药品',
          },{
            value:'医疗用毒性药品',label:'医疗用毒性药品',
          },{
            value:'放射性药品',label:'放射性药品',
          },{
            value:'药品类易制毒化学品',label:'药品类易制毒化学品',
          },{
            value:'蛋白同化制剂',label:'蛋白同化制剂',
          },{
            value:'肽类激素',label:'肽类激素',
          },{
            value:'药用辅料',label:'药用辅料',
          },{
            value:'直接接触药品的包装材料',label:'直接接触药品的包装材料',
          },{
            value:'其他(具体说明)',label:'其他(具体说明)',
          }],

          inspectColumnsVxe:[{//检验信息
              title: '审评任务', 
              field: 'jcrw',
          },{
              title: '企业名称', 
              field: 'qymc',
          },{
              title: '审评类型', 
              field: 'jclx',
          },{
              title: '企业地址', 
              field: 'qydz',
          },{
              title: '执法单位', 
              field: 'zfdw',
          },{
              title: '审评结果', 
              field: 'jcjg',
          },{
              title: '审评日期', 
              field: 'jcrq',
          },],
          refreshTable:null,
          KeyPersonnelreshTable:null,
          isDisabled:false,
          methodList:[{
              index:0,
          },{index:1,},{
              name:'品种信息',
              deleteName:spcyQyInfoDeletePzjbxx,
              editName:spcyQyInfoUpdatePzjbxx,
              addName:spcyQyInfoAddPzjbxx,
          },{index:3},{
              name:'供应商',
              deleteName:spcyQyInfoDeleteYlgyssj,
              editName:spcyQyInfoUpdateYlgyssj,
              addName:spcyQyInfoAddYlgyssj,
          },{
              name:'企业产值',
              addName:spcyQyInfoaddQyCz,
              editName:spcyQyInfoupdateQyCz,
              deleteName:spcyQyInfodeleteQyCz,
          },{
              name:'研发投入',
              addName:spcyQyInfoaddQyYftr,
              editName:spcyQyInfoupdateQyYftr,
              deleteName:spcyQyInfodeleteQyYftr,
          },{
              name:'其他人员信息',
              addName:xzxkqyaddQyQtry,
              editName:xzxkqyupdateQyQtry,
              deleteName:xzxkqydeleteQyQtry,
          },{index:8},{index:9},{index:10},{
              name:'设备信息',
              deleteName:spcyQyInfodeleteQySbxx,
              editName:spcyQyInfosaveQySbxx,
              addName:spcyQyInfosaveQySbxx,
          }],
          KeyPersonnelShow:true,
          othersPersonnelShow:true,
          formEditState:{AuditCycleArr:[]},
          EditYearPickerKey:null,
      }
  },
  watch:{

  },
  created(){
      if(!this.commentPassData.fqyid){
          this.getEnterpriseDetails()
      }
  },
  methods:{
      getData(row,isDisabled){
          this.isDisabled = isDisabled
          this.commentPassData = row
          this.getEnterpriseDetails(row)
      },
      getEnterpriseDetails(row){//获取企业信息
          let data = {}
          if(row && row.fqyid){
              data = {
                  fqyid:row.fqyid
              }
          }
          spcyQyInfoqueryQyJbxxById({data}).then(res=>{
              if(res.code == 200){
                  //console.log('获取企业信息',res.result.qyxx )
                  this.currentEnterpriseFrom = res.result.qyxx?res.result.qyxx:{}
              }else{
                  this.currentEnterpriseFrom ={}
              }
          })
      },
      selectChange(item){
          this.currentSelectData = item
          this.refreshTable = Date.now()
      },
      selectEnterpriseInfoLeftClick(item){
          this.currentEnterInfoData = item
          if(item.title == '物料管理'){
              this.$nextTick(()=>{
                  this.$refs.materialManageRef.getData({...this.currentEnterpriseFrom,isDisabled:this.isDisabled})
              })
          }
          this.refreshTable = Date.now()
          if(item.title == '人员信息'){
              this.KeyPersonnelreshTable = Date.now()
          }
      },

      addClick(index,row){
          this.currentAddRefName = 'addEditRef'+index
          let refName = 'addEditRef'+index
          this.$refs[refName].getData({fqyid:this.currentEnterpriseFrom.id,index:index,...row})
          this.$refs[refName].visible = true
      },
      editClick(val,index,view){
          //console.log(val,index)
          let refName = 'addEditRef'+index
          this.$refs[refName].getData({fqyid:this.currentEnterpriseFrom.id,...val,index:index,view:view?true:false})
          this.$refs[refName].visible = true
      },
      panelChange(val,ref,row){//年份编辑
        this.formEditState.fnf = val
        this.EditYearPickerKey = Date.now()
        this.$refs[ref].$refs.xGrid.updateStatus(row)
      },
      resettingFromChange(){//新增时重置编辑的插槽数据
        this.formEditState.AuditCycleArr = []
      },
      saveEditTableClick(val,index,ref){//编辑表格保存
        this.saveEditLoading = true
        //console.log(val)
        if(!val.id || (val.id && val.id.indexOf('row_') !== -1)){
            val = {...val,id:'',fqyid:this.currentEnterpriseFrom.id,}
            this.methodList[index].addName(val).then(res=>{
                if(res.code == 200){
                    // this.refreshTable = Date.now()
                    this.$message.success(res.message)
                    this.$refs[ref].searchEvent()
                }else{
                    this.$message.warning(res.message)
                }
                this.saveEditLoading = false
            })
        }else{
            this.methodList[index].editName({...val,fqyid:this.currentEnterpriseFrom.id,}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.$refs[ref].searchEvent()
                }else{
                    this.$message.warning(res.message)
                }
                this.saveEditLoading = false
            })
        }
        
      },
      addItem(val,vis,isTip){
          //console.log('新增',val)
          let refName = 'addEditRef'+val.index
          this.methodList[val.index].addName(val).then(res=>{
              if(res.code == 200){
                  this.refreshTable = Date.now()
                  if(!isTip){
                      this.$message.success(res.message)
                  }
                  
                  this.$refs[refName].getData({fqyid:this.currentEnterpriseFrom.id,...res.result,index:val.index})
                  this.$refs[refName].visible = vis
                  //console.log(res)
              }else{
                  this.$message.warning(res.message)
              }
          })
      },
      editItem(val,vis){
          //console.log('编辑',val)
          let refName = 'addEditRef'+val.index
          this.methodList[val.index].editName(val).then(res=>{
              if(res.code == 200){
                  this.refreshTable = Date.now()
                  this.$message.success(res.message)
                  this.$refs[refName].visible = vis
              }else{
                  this.$message.warning(res.message)
              }
          })
      },
      deleteClick(val,index){
          var that = this
          this.$confirm({
              title:'您确认要删除吗？',
              // icon: createVNode(ExclamationCircleOutlined),
              onOk() {
                  that.methodList[index].deleteName({ids:val.id}).then(res=>{
                      if(res.code == 200){
                          that.$message.success('删除成功')
                          that.refreshTable = Date.now()
                      }else{
                          that.$message.warning(res.message)
                      }
                  })
              },
              
          });
      },
      detailsClick(row){
          this.$refs.enterDetailsRef.getData(row)
          this.$refs.enterDetailsRef.visible = true
      },
      leadingInClick({file}){//导入
          var that = this
          if(typeof file.uid !== 'undefined') {
              if(file.name.indexOf(".xls") !== -1 || file.name.indexOf(".xlsx") !==-1) {
                  const fileData = new FormData();
                  fileData.append("file",file);
                  fileData.append("fqyid",this.currentEnterpriseFrom.id);
                  xzxkqyimportQyQtRy(fileData).then(res => {
                      that.refreshTable = Date.now()
                      that.$message.success('导入成功')
                  }).catch(error =>{
                      that.$message.success('导入失败')
                  })
              }else{
                  this.$message.warning('请导入表格')
              }

          }
      },
      personnelExportClick(val){//导出
          let that = this
          let fileName = ''
          let param = {
              fqyid:this.currentEnterpriseFrom.id,
              tyshxydm:this.currentEnterpriseFrom.ftyshxydm
          }
          if(val == '关键人员'){
              fileName = '关键人员列表'
              xzxkqyexportQyRyxx(param).then((data) => {
                  if (!data) {
                      that.$message.warning('文件下载失败')
                      return
                  }
                  if (typeof window.navigator.msSaveBlob !== 'undefined') {
                      window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
                  } else {
                      let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
                      let link = document.createElement('a')
                      link.style.display = 'none'
                      link.href = url
                      link.setAttribute('download', fileName + '.xls')
                      document.body.appendChild(link)
                      link.click()
                      document.body.removeChild(link) //下载完成移除元素
                      window.URL.revokeObjectURL(url) //释放掉blob对象
                  }
              })
          }else{
              fileName = '其他人员列表'
              xzxkqyexportQyQtRy(param).then((data) => {
                  if (!data) {
                      that.$message.warning('文件下载失败')
                      return
                  }
                  if (typeof window.navigator.msSaveBlob !== 'undefined') {
                      window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
                  } else {
                      let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
                      let link = document.createElement('a')
                      link.style.display = 'none'
                      link.href = url
                      link.setAttribute('download', fileName + '.xls')
                      document.body.appendChild(link)
                      link.click()
                      document.body.removeChild(link) //下载完成移除元素
                      window.URL.revokeObjectURL(url) //释放掉blob对象
                  }
              })
          }
      },
      saveDtaClick(row){
        //console.log('888888',row)
      },
  }
}
</script>
<style lang="less">
.n-1-enterpriseDetails-content{
  margin: 10px;
  .top-navigation-bar{
      width: 100%;
      display: flex;
      .navigation-item-box{
          cursor: pointer;
          flex: 1;
          display: flex;
          justify-content: center;
          align-items: center;
          padding: 16px 0;
          // background-color: #edeff3;
          // border: 1px solid #d9d9d9;
          border-top-left-radius: 28px;
          border-top-right-radius: 28px;
          .navigation-icon{
              font-size: 26px;
              margin-right: 5px;
          }
          .navigation-title{
              font-size: 26px;
              font-weight: 600;
          }
          color: #999;
      }
      .select-item-box{
          background-color: #e6f7ff;
          border: 1px solid #d9d9d9;
          border-bottom: none;
          // border-bottom: 4px solid #38f;
          color: #38f;
          
      }
  }
  .navigation-content-box{
      margin-top: -1px;
      height: calc(100vh - 202px);
      border: 1px solid #d9d9d9;
      overflow-y: auto;
      .enterprise-information-box{//企业信息
          display: flex;
          // padding: 8px;
          .enterprise-info-left{
              height: calc(100vh - 204px);
              overflow-y: auto;
              // border: 1px solid #d9d9d9;
              border-right: 1px solid #d9d9d9;
              min-width: 180px;
              max-width: 20%;
              padding: 8px 0;
              
              .info-left-item{
                  padding: 8px 10px;
                  display: flex;
                  align-items: center;
                  cursor: pointer;
                  .info-left-icon{
                      margin-right: 5px;
                      font-size: 18px;
                      color: #999;
                  }
                  .info-left-text{
                      font-size: 17px;
                      font-weight: 600;
                      color: #999;
                  }
              }
              .select-enterInfoItem-box{
                  background-color: #e6f7ff;
                  border-right: 5px solid #38f;
                  .info-left-icon,.info-left-text{
                      color: #242424 !important;
                  }
              }
          }
          .enterprise-info-right{
              height: calc(100vh - 204px);
              overflow-y: auto;
              flex: 1;
              // border: 1px solid #d9d9d9;
              // border-left: none;
              padding: 8px;
              .personnel-class-top-v{
                  display: flex;
                  align-items: center;
                  
                  .personnel-class-title{
                      height: 32px;
                      font-size: 20px;
                      font-weight: 600;
                      color: #242424;
                      position: relative;
                      margin-bottom: 5px;
                      width: 140px;
                      .vertical-line{
                          position: absolute;
                          background-image: linear-gradient(to right, rgb(15, 155, 255), rgba(15, 155, 255, 0), );
                          background-size: 100% 100% !important;
                          width: 125px;
                          height: 8px;
                          bottom: 0;
                          z-index: 0;
                      }
                      .title{
                          position: absolute;
                          z-index: 1;
                          bottom: -1px;
                      }
                  }
                  .hide-display-box{
                      color: #38f;
                      font-weight: 600;
                      display: flex;
                      align-items: center;
                  }
              }
              .table-box-v{
                  td{
                      padding: 5px;
                      height: 30px;
                  }
                  .title-left-v{
                      text-align: center;
                      width: 160px;
                      font-weight: 600;
                      font-size: 16px;
                      background-color:#e6f7ff;
                      font-family: simHei;
                      color: rgba(0, 0, 0, 0.85);
                      .production-tips-box{
                          color: #ed5565;
                          font-size: 14px;
                          line-height: 30px;
                          padding-right: 5px;
                      }
                  }
              }
              
          }
      }
  }
}
</style>